package com.zxy.controlcenter.core.shiro.service;

import com.zxy.controlcenter.core.shiro.ShiroUser;
import com.zxy.controlcenter.modular.system.model.Admin;
import org.apache.shiro.authc.AuthenticationInfo;

/**
 * @author zxy
 */
public interface UserAuthService {
    /**
     * 根据手机号获取用户信息
     *
     * @param mobile 手机号
     * @return 用户信息
     */
    Admin getAdminByAccount(String mobile);

    /**
     * 根据系统用户获取shiro用户
     *
     * @param admin 系统用户
     * @return shiro用户
     */
    ShiroUser getShiroAdmin(Admin admin);

    AuthenticationInfo info(ShiroUser shiroUser, Admin admin, String name);
}
